package com.boliq.lol.base;

import android.content.Context;
import android.os.Bundle;

import androidx.annotation.LayoutRes;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;


public abstract class BaseActivity extends AppCompatActivity {

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(contentView());
        initView();
        initData();
        bindData();
        bindEvent();
        operation();
    }

    protected abstract @LayoutRes
    int contentView();

    protected abstract void initView();

    protected abstract void initData();

    protected void bindData() {
    }

    protected abstract void bindEvent();

    protected void operation() {
    }

    protected Context getContext() {
        return this;
    }
}
